//  获取组织架构数据
import request from '@/utils/request'
export function getDepartments() {
    return request({
      url: '/company/department'
    })
}
//  删除功能模块
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
//  封装新增功能部门的api模块
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// **封装获取部门信息的模块** 
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑部门接口
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
